package com.biglead.mini.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biglead.mini.mapper.UmsMemberReceiveAddressMapper;
import com.biglead.mini.pojo.UmsMemberReceiveAddress;
import com.biglead.mini.service.UmsMemberReceiveAddressService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UmsMemberReceiveAddressServiceImpl extends ServiceImpl<UmsMemberReceiveAddressMapper, UmsMemberReceiveAddress> implements UmsMemberReceiveAddressService {

    @Override
    public List<UmsMemberReceiveAddress> getAllList() {
        return this.list(new LambdaQueryWrapper<UmsMemberReceiveAddress>());
    }

    @Override
    public boolean add(UmsMemberReceiveAddress address) {
        return this.save(address);
    }

    @Override
    public boolean deleteFromId(Long id) {
        return this.removeById(id);
    }

    @Override
    public boolean updateFromId(Long id, UmsMemberReceiveAddress address) {
        address.setId(id);
        return this.updateById(address);
    }
    @Override
    public UmsMemberReceiveAddress getItem(Long id) {
        return this.getById(id);
    }
}
